package bildbearbeitung;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.List;

import javax.imageio.ImageIO;

import net.sf.image4j.codec.ico.ICODecoder;

public class PicEdit {

	BufferedImage img1;
	BufferedImage img2;
	Graphics2D img1edit;
	List<BufferedImage> image;

	public static void main(String[] args) {
		new PicEdit(new File("Icon.ico"), new File("succes.png"));

	}

	private PicEdit(File f, File f2) {
		try {

			List<BufferedImage> image = ICODecoder.read(f);
			
			
			img1 = image.get(0);
			img2 = ImageIO.read(f2);
			

			img1.getGraphics().drawImage(img2, 216, 216, null);

			ImageIO.write(img1, "png", new File("Icon.png"));

		} catch (IOException e) {

			e.printStackTrace();
		}
	}

	

}
